﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ninject;
using Services;

namespace Injection {
    public class Kernel {
        public static IKernel SetupDI() {

            // Create Ninject DI Kernel 
            IKernel kernel = new StandardKernel();

            // Register services with our Ninject DI Container

            kernel.Bind<Services.IRepository>()
                    .To<Concrete.XmlRepository>()
                    .WithConstructorArgument("filename", "Products.xml"
                    );

            return kernel;

        }
    }
}
